﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //Http的Get方法
        LbQueryString.Text="limit="+this.Request.QueryString["limit"] + 
            ",page="+this.Request.QueryString["page"];
        //Http的Post方法
        LbMessage.Text = Request.Form["TbUsername"];
        LbMessage2.Text = Request.Form["username"]+","+Request["submit"];
        //Server Variables
        foreach(var item in Request.ServerVariables.Keys)
        {
            LbServerVariables.Text +="key:"+ item + "<br>";
        }
        LbServerVariables.Text += "服务器地址." + Request.ServerVariables["LOCAL_ADDR"]+"<br>";
        LbServerVariables.Text += "服务器端口."+Request.ServerVariables["SERVER_PORT"] + "<br>";
        LbServerVariables.Text += "访问客户端地址." + Request.ServerVariables["REMOTE_ADDR"] + "<br>";
        LbServerVariables.Text += "客户端端口." + Request.ServerVariables["REMOTE_PORT"] + "<br>";
        //Browser
        LbBrowser.Text += "浏览器类型:" + Request.Browser["Browser"] + "<br>";
        LbBrowser.Text += "浏览器版本号:" + Request.Browser.Version+"<br>";
        Response.Write(Request.UserAgent+"<br>");
        Response.Write(Request.Cookies);
        //Response.Write(Request.Cookies.Keys[0]+":"+Request.Cookies.Get("ASP.NET_SessionId").Value+"<br><br>");

    }
}